package com.atguigu.yygh.cmn.congfig;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author:hrh
 * @create: 2022-11-05 13:25
 * @Description: 配置分页插件
 */
@Configuration
@EnableTransactionManagement
@ComponentScan(basePackages = "com.atguigu")
@MapperScan(basePackages = "com.atguigu.yygh.cmn.mapper")
public class CmnConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
